home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
phome102.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-02-06
|
5KB
|
179 lines
/* REXX installation script for PhonHome */
/*call SysLoadFuncs */
call RxFuncAdd 'SysCls', 'RexxUtil', 'SysCls'
call RxFuncAdd 'SysIni', 'RexxUtil', 'SysIni'
call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
call RxFuncAdd 'SysCurPos', 'RexxUtil', 'SysCurPos'
call RxFuncAdd 'SysGetKey', 'RexxUtil', 'SysGetKey'
call RxFuncAdd 'SysTextScreenRead', 'RexxUtil', 'SysTextScreenRead'
call RxFuncAdd 'SysOS2Ver', 'RexxUtil', 'SysOS2Ver'
call SysCls
say ""
say "****************************************************************"
say " PHONHOME Installation"
say "****************************************************************"
say ""
rc = stream('phonhome.exe','c','query exists')
if rc='' then
do
say " Sorry, phonhome.exe not found. Must not be wrong directory. Terminating."
exit
end
tcpetc = value('ETC',,'OS2ENVIRONMENT')
parse var tcpetc os2dir'\'rest
pcomdir = os2dir'\tcpip\pcomos2'
rc=stream('C:\zoc\zoc.exe', 'c', 'query exists')
if rc="" then
do
rc=stream('D:\zoc\zoc.exe', 'c', 'query exists')
if rc="" then
do
rc=stream('E:\zoc\zoc.exe', 'c', 'query exists')
if rc="" then
do
rc=stream('F:\zoc\zoc.exe', 'c', 'query exists')
if rc="" then
do
rc=stream('G:\zoc\zoc.exe', 'c', 'query exists')
end
end
end
end
parse var rc zocdir'\'rest
zocdir=zocdir'\zoc\script'
instdir=""
curdir = directory()
if curdir='A:\' | curdir='B:\' then
do
flopdir=directory()
instdir='C'
say ' Press enter to Install PHONHOME on drive 'instdir' or enter alternative'
say ' drive such as D, E etc (type [exit] to cancel) >C'
pos=SysCurPos(6, 49)
do forever
key = SysGetKey('ECHO')
if key='0D'x then leave
end
answer=SysTextScreenRead(6,49,1)
say " "
if answer='exit' | answer='EXIT' then exit
if answer<>'' then
do
parse upper var answer answer
count=length(answer)
if count<>1 then
do
count=count-1
end=substr(answer,count,1)
if end=":" then instdir=answer''"\"
if end="\" then instdir=answer
end
if count=1 then instdir=answer''":\"
check=directory(instdir)
if check<>instdir then
do
say " Cannot find drive "answer
say " Cancelling installation"
exit
end
if check=instdir then
do
instd=instdir''"PHONHOME"
end
end
say ""
say " Phonhome installation drive is "instdir
say ""
say " Continue with installation? Answer Y or N >Y"
pos=SysCurPos(10, 44)
pull answer .
if answer<>"" & answer<>"Y" & answer<>"yes" then
do
say ""
say " Answer was not Y, installation cancelled"
enddir=directory(flopdir)
exit
end
check=directory(instd)
newdir=directory(instdir)
if check<>instd then 'MD phonhome'
'copy A:\*.* 'instd
newdir=directory(flopdir)
newdir=newdir'runtime\'
newdir'unzip 'newdir'vrobj.zip -d 'instd
newdir=instd
end
if curdir<>'A:\' & curdir<>'B:\' then
do
instd=curdir
newdir=instd
say ""
say " Phonhome installation directory is "instd
say ""
say " Continue with installation? Answer Y or N >Y"
pos=SysCurPos(8, 44)
pull answer .
if answer<>"" & answer<>"Y" & answer<>"yes" then
do
say ""
say " Answer was not Y, installation cancelled"
exit
end
end
'MD 'instd'\download'
'MD 'instd'\upload'
call SysIni instd'\schedule.ini', inetlink, PROG, instd
'COPY 'instd'\accecall.zrx 'zocdir
ver=SysOS2Ver()
if ver="4.00" | ver="2.40" | ver>3.00 then
do
'COPY 'instd'\phform.ws 'pcomdir
'COPY 'instd'\phremote.ws 'pcomdir
end
filename = stream(instd'\phonhome.exe','c','query exists')
if filename \= '' then
do
title = "Phonhome"
classname = 'WPProgram'
location = '<WP_DESKTOP>'
setup = 'EXENAME='filename';STARTUPDIR='newdir
if existed = '' then setup = setup';PARAMETERS=%*'
call SysCreateObject classname,title,location,setup,u
end
/*call SysCls */
say ""
say ""
say "----------------------------------------------------------------"
say " Phonhome Scheduler "
say " Written by Geoff Brown - All rights reserved "
say "----------------------------------------------------------------"
say ""
say " Phonhome icon successfully created on the desktop..."
say ""
say " Start Phonhome by double-clicking on the program object."
say ""
say "****************************************************************"
say " This program is distributed as Shareware! You MUST register"
say " this product if you continue to use it. Please see the help"
say " directory for registration details."
say "****************************************************************"
say ""
exit